import 'package:flutter/material.dart';

class Buttondemo{
  /*
  ElevatedButton 即"漂浮"按钮，它默认带有阴影和灰色背景。按下后，阴影会变大
   */
  static ElevatedButton getButton(){
    return ElevatedButton(
      child: Text("normal"),
      onPressed: () {},
    );
  }

  /*
  TextButton即文本按钮，默认背景透明并不带阴影。按下后，会有背景色
   */
  static TextButton getButton2(){
    return TextButton(
      child: Text("normal"),
      onPressed: () {},
    );
  }

  /*
  OutlinedButton默认有一个边框，不带阴影且背景透明。按下后，边框颜色会变亮、同时出现背景和阴影(较弱)
   */
  static OutlinedButton getButton3(){
    return OutlinedButton(
      child: Text("normal"),
      onPressed: () {},
    );
  }

  /*
  IconButton是一个可点击的Icon，不包括文字，默认没有背景，点击后会出现背景
   */
  static IconButton getButton4(){
    return IconButton(
      icon: Icon(Icons.thumb_up),
      onPressed: () {},
    );
  }

  static ElevatedButton getButton5(){
    return ElevatedButton.icon(
      icon: Icon(Icons.send),
      label: Text("发送"),
      onPressed: (){

      },
    );
  }

  static OutlinedButton getButton6(){
    return OutlinedButton.icon(
      icon: Icon(Icons.add),
      label: Text("添加"),
      onPressed: (){},
    );
  }
   static TextButton getButton7(){
    return TextButton.icon(
      icon: Icon(Icons.info),
      label: Text("详情"),
      onPressed: (){},
    );
   }
}